<?php 


require '../dao/saiduandao.php';
$dao=new saiduandao();
$saiduanlist=$dao->Chaxun();//查询id
if(empty($saiduanlist)) {
	$info="赛段地图不存在";
}
?>
<table class="tab">
<tr>
	<td>赛段地图ID</td>
	<td>关卡</td>
	<td>名次金币</td>
	<td>赛事图</td>
	<td>游戏图</td>
	<td>赛段图</td>

</tr>
 <?php foreach ($saiduanlist as $gamer){ ?>
 <tr>
	<?php foreach ($gamer as $i=>$value){
	if($value=="del"){?>
       <td><a href="main.php?url=saiduan.php&delid=<?php echo $gamer['id']?>">删除</a></td>    
	<?php }
	 else {  ?><td><?php 
if ($i=='img' || $i=='playmap' || $i=='simg'){
if(strpos($value, "/")!=false ){
echo "<img src='../../qian/".$value."'/>";
}else
echo "<img src='../view/img.php?src=".$value."'/>";
}
   else {echo $value; }	
	}?></td>
	<?php } ?>
</tr>
<?php }?>


</table>
<?php  if(!empty($infoo)){echo $infoo;}
?>